package com.shenglue.ssi.service;

import java.util.List;

import com.shenglue.ssi.dao.GoodDao;

import com.shenglue.ssi.domain.Good;


public class GoodServiceImpl implements GoodService {

	private GoodDao	goodDao;

	public GoodDao getGoodDao() {
		return goodDao;
	}

	public void setGoodDao(GoodDao goodDao) {
		this.goodDao = goodDao;
	}


	/**
	 * 查询所有商品信息
	 */
	public List<Good> selectAllGood() {
		return goodDao.selectAllGood();
	}

	/**
	 * 增加商品记录
	 */
	public boolean saveGood(Good good){
		return goodDao.saveGood(good);
	}

	/**
	 * 修改商品记录
	 */
	public boolean updateGood(Good good){
		return goodDao.updateGood(good);
	}

	/**
	 * 删除商品记录
	 */
	public boolean deleteGood(int goodId) {
		return goodDao.deleteGood( goodId );
	}

	/**
	 * 查询 某供应商的所有商品信息
	 */
	public List<Good> selectGoodOf1Supp( int suppId ) {
		return goodDao.selectGoodOf1Supp( suppId );
	}

}
